package com.szrt.spring.ch07.m01.student.service.impl;

import com.szrt.spring.ch07.m01.student.dao.StudentDao;
import com.szrt.spring.ch07.m01.student.service.StudentService;

public class StudentServiceImpl implements StudentService {
	
	
	private StudentDao studentDao;
	
	
	/**
	 * 1:通过set方法注入依赖属性StudentDao
	 */
	public void setStudentDao(StudentDao studentDao) {
		System.out.println("通过set方法注入依赖属性StudentDao...");
		this.studentDao = studentDao;
	}



	@Override
	public void save() {
		
		studentDao.save();
	}
	
	
}
